import yaml
from typing import Any, Dict

def read_yaml(filename: str) -> Dict[str, Any]:
    with open(filename, 'r', encoding='utf-8') as f:
        return yaml.safe_load(f) or {}   # 空文件返回 {}